// homework.js
import request from '@/utils/request.js'

// 更新作业评分并返回后端响应
export const updateHomeworkService = (id, grade) => {
  return request.patch(
    `/homeworks/${id}`,
    { grade: Number(grade) },
    { headers: { 'Content-Type': 'application/json' } }
  )
}

// 获取所有符合条件的数据

export const getAllSubjects = params => request.get('/homeworks', { params })
